<?php

/**
 * Coupon form.
 *
 * @package    tsantek-shop
 * @subpackage form
 * @author     Tomislav Šantek
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class CouponForm extends BaseCouponForm
{
  public function configure()
  {
      unset(
              $this['created_at'],
              $this['updated_at']
              );
      $this->embedRelations
        (
                array
                (
                        'Categories' => array
                        (
                                'considerNewFormEmptyFields' => array('category_id','order_num'),
                                'noNewForm' => false,
                                'newFormLabel' => 'Kategorije',
                                'newFormClass' => 'CategoryCouponForm',
//					'newFormClassArgs' => array(array('df_id' => 666)),
                                'displayEmptyRelations' => true,
                                'formClass' => 'CategoryCouponForm',
                                'formClassArgs' => array(array('ah_add_delete_checkbox' => true, 'another_form_option' => '...')),
                                'newFormAfterExistingRelations' => false,
                                'formFormatter' => null,
                                'multipleNewForms' => true,
                                'newFormsInitialCount' => 1,
                                'newFormsContainerForm' => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
                                'newRelationButtonLabel' => '+ dodaj novo...',
                                'newRelationAddByCloning' => true,
                                'newRelationUseJSFramework' => 'jQuery',
                                'customEmbeddedFormLabelMethod' => 'getLabelTitle'
                        ),
                        'Products' => array
                        (
                                'considerNewFormEmptyFields' => array('product_id','order_num'),
                                'noNewForm' => false,
                                'newFormLabel' => 'Proizvodi',
                                'newFormClass' => 'ProductCouponForm',
//					'newFormClassArgs' => array(array('df_id' => 666)),
                                'displayEmptyRelations' => true,
                                'formClass' => 'ProductCouponForm',
                                'formClassArgs' => array(array('ah_add_delete_checkbox' => true, 'another_form_option' => '...')),
                                'newFormAfterExistingRelations' => false,
                                'formFormatter' => null,
                                'multipleNewForms' => true,
                                'newFormsInitialCount' => 1,
                                'newFormsContainerForm' => null, // pass BaseForm object here or we will create ahNewRelationsContainerForm
                                'newRelationButtonLabel' => '+ dodaj novo...',
                                'newRelationAddByCloning' => true,
                                'newRelationUseJSFramework' => 'jQuery',
                                'customEmbeddedFormLabelMethod' => 'getLabelTitle'
                        ),
                )
        );

  }
}
